﻿////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// <copyright>Copyright 2008-2011 Andreas Huber Doenni</copyright>
// Distributed under the GNU General Public License version 2 (GPLv2).
// See accompanying file License.txt or copy at http://phuse.codeplex.com/license.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace Phuse.Mime
{
    /// <summary>Implements the common functionality for all <see cref="Entity"/> subclasses.</summary>
    /// <typeparam name="TMostDerived">The most-derived subclass of this type.</typeparam>
    /// <threadsafety static="true" instance="false"/>
    public abstract class Entity<TMostDerived> : Entity, IVisitable<TMostDerived, Entity>
        where TMostDerived : Entity<TMostDerived>
    {
        /// <summary>See <see cref="IVisitable{T}.Accept"/>.</summary>
        public sealed override void Accept(IVisitor<Entity> visitor)
        {
            VisitableHelper.Accept(this, visitor);
        }

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        internal Entity()
        {
        }
    }
}
